<?php

namespace app\models;

use Yii;
use app\models\Wechat;

class WechatSdk extends Wechat
{

    protected function setCache($key, $value, $expired)
    {
        $redis = Yii::$app->redis;

        return $redis->setex($key, $expired, $value);
    }

    protected function getCache($key)
    {
        $redis = Yii::$app->redis;

        return false; //DEBUG
        //return $redis->get($key);
    }

    protected function removeCache($key)
    {
        $redis = Yii::$app->redis;

        return $redis->del($key);
    }
}